package com.example.smartlearning.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.smartlearning.entity.LessonCollectionEntity;

import java.util.List;

/**
 * 收藏的dao接口
 */
public interface CollectionDao extends BaseMapper<LessonCollectionEntity> {

    //查询当前用户的所有收藏
    List<LessonCollectionEntity> selectCollectionByUserId(int userId);

    //增加收藏
    int addCollection(int userId, int lessonId);

    //取消收藏
    String cancelCollection(int collectionId);


}
